{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils';\nimport { ActionTypes } from './useListbox.types';\nimport defaultReducer from './defaultListboxReducer';\nimport useControllableReducer from './useControllableReducer';\nimport areArraysEqual from '../utils/areArraysEqual';\nvar TEXT_NAVIGATION_RESET_TIMEOUT = 500; // milliseconds\n\nvar defaultOptionComparer = function defaultOptionComparer(optionA, optionB) {\n  return optionA === optionB;\n};\nvar defaultIsOptionDisabled = function defaultIsOptionDisabled() {\n  return false;\n};\nvar defaultOptionStringifier = function defaultOptionStringifier(option) {\n  return typeof option === 'string' ? option : String(option);\n};\nexport default function useListbox(props) {\n  var _props$optionIdGenera, _options$highlightedI;\n  var _props$disabledItemsF = props.disabledItemsFocusable,\n    disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,\n    _props$disableListWra = props.disableListWrap,\n    disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,\n    _props$focusManagemen = props.focusManagement,\n    focusManagement = _props$focusManagemen === void 0 ? 'activeDescendant' : _props$focusManagemen,\n    idProp = props.id,\n    _props$isOptionDisabl = props.isOptionDisabled,\n    isOptionDisabled = _props$isOptionDisabl === void 0 ? defaultIsOptionDisabled : _props$isOptionDisabl,\n    externalListboxRef = props.listboxRef,\n    _props$multiple = props.multiple,\n    multiple = _props$multiple === void 0 ? false : _props$multiple,\n    _props$optionComparer = props.optionComparer,\n    optionComparer = _props$optionComparer === void 0 ? defaultOptionComparer : _props$optionComparer,\n    _props$optionStringif = props.optionStringifier,\n    optionStringifier = _props$optionStringif === void 0 ? defaultOptionStringifier : _props$optionStringif,\n    options = props.options,\n    externalReducer = props.stateReducer;\n  var id = useId(idProp);\n  function defaultIdGenerator(_, index) {\n    return \"\".concat(id, \"-option-\").concat(index);\n  }\n  var optionIdGenerator = (_props$optionIdGenera = props.optionIdGenerator) != null ? _props$optionIdGenera : defaultIdGenerator;\n  var propsWithDefaults = _extends({}, props, {\n    disabledItemsFocusable: disabledItemsFocusable,\n    disableListWrap: disableListWrap,\n    focusManagement: focusManagement,\n    isOptionDisabled: isOptionDisabled,\n    multiple: multiple,\n    optionComparer: optionComparer,\n    optionStringifier: optionStringifier\n  });\n  var listboxRef = React.useRef(null);\n  var handleRef = useForkRef(externalListboxRef, listboxRef);\n  var textCriteriaRef = React.useRef({\n    searchString: '',\n    lastTime: null\n  });\n  var _useControllableReduc = useControllableReducer(defaultReducer, externalReducer, propsWithDefaults),\n    _useControllableReduc2 = _slicedToArray(_useControllableReduc, 2),\n    _useControllableReduc3 = _useControllableReduc2[0],\n    highlightedValue = _useControllableReduc3.highlightedValue,\n    selectedValue = _useControllableReduc3.selectedValue,\n    dispatch = _useControllableReduc2[1];\n  var highlightedIndex = React.useMemo(function () {\n    return highlightedValue == null ? -1 : options.findIndex(function (option) {\n      return optionComparer(option, highlightedValue);\n    });\n  }, [highlightedValue, options, optionComparer]);\n  var previousOptions = React.useRef([]);\n  React.useEffect(function () {\n    if (areArraysEqual(previousOptions.current, options, optionComparer)) {\n      return;\n    }\n    dispatch({\n      type: ActionTypes.optionsChange,\n      event: null,\n      options: options,\n      previousOptions: previousOptions.current,\n      props: propsWithDefaults\n    });\n    previousOptions.current = options;\n\n    // No need to re-run this effect if props change\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [options, optionComparer, dispatch]);\n  var setSelectedValue = React.useCallback(function (option) {\n    dispatch({\n      type: ActionTypes.setValue,\n      event: null,\n      value: option\n    });\n  }, [dispatch]);\n  var setHighlightedValue = React.useCallback(function (option) {\n    dispatch({\n      type: ActionTypes.setHighlight,\n      event: null,\n      highlight: option\n    });\n  }, [dispatch]);\n  var createHandleOptionClick = function createHandleOptionClick(option, other) {\n    return function (event) {\n      var _other$onClick;\n      (_other$onClick = other.onClick) == null ? void 0 : _other$onClick.call(other, event);\n      if (event.defaultPrevented) {\n        return;\n      }\n      event.preventDefault();\n      dispatch({\n        type: ActionTypes.optionClick,\n        option: option,\n        event: event,\n        props: propsWithDefaults\n      });\n    };\n  };\n  var createHandleOptionPointerOver = function createHandleOptionPointerOver(option, other) {\n    return function (event) {\n      var _other$onMouseOver;\n      (_other$onMouseOver = other.onMouseOver) == null ? void 0 : _other$onMouseOver.call(other, event);\n      if (event.defaultPrevented) {\n        return;\n      }\n      dispatch({\n        type: ActionTypes.optionHover,\n        option: option,\n        event: event,\n        props: propsWithDefaults\n      });\n    };\n  };\n  var createHandleKeyDown = function createHandleKeyDown(other) {\n    return function (event) {\n      var _other$onKeyDown;\n      (_other$onKeyDown = other.onKeyDown) == null ? void 0 : _other$onKeyDown.call(other, event);\n      if (event.defaultPrevented) {\n        return;\n      }\n      var keysToPreventDefault = ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'];\n      if (focusManagement === 'activeDescendant') {\n        // When the child element is focused using the activeDescendant attribute,\n        // the listbox handles keyboard events on its behalf.\n        // We have to `preventDefault()` is this case to prevent the browser from\n        // scrolling the view when space is pressed or submitting forms when enter is pressed.\n        keysToPreventDefault.push(' ', 'Enter');\n      }\n      if (keysToPreventDefault.includes(event.key)) {\n        event.preventDefault();\n      }\n      dispatch({\n        type: ActionTypes.keyDown,\n        event: event,\n        props: propsWithDefaults\n      });\n\n      // Handle text navigation\n      if (event.key.length === 1 && event.key !== ' ') {\n        var textCriteria = textCriteriaRef.current;\n        var lowerKey = event.key.toLowerCase();\n        var currentTime = performance.now();\n        if (textCriteria.searchString.length > 0 && textCriteria.lastTime && currentTime - textCriteria.lastTime > TEXT_NAVIGATION_RESET_TIMEOUT) {\n          textCriteria.searchString = lowerKey;\n        } else if (textCriteria.searchString.length !== 1 || lowerKey !== textCriteria.searchString) {\n          // If there is just one character in the buffer and the key is the same, do not append\n          textCriteria.searchString += lowerKey;\n        }\n        textCriteria.lastTime = currentTime;\n        dispatch({\n          type: ActionTypes.textNavigation,\n          event: event,\n          searchString: textCriteria.searchString,\n          props: propsWithDefaults\n        });\n      }\n    };\n  };\n  var createHandleBlur = function createHandleBlur(other) {\n    return function (event) {\n      var _other$onBlur, _listboxRef$current;\n      (_other$onBlur = other.onBlur) == null ? void 0 : _other$onBlur.call(other, event);\n      if (event.defaultPrevented) {\n        return;\n      }\n      if ((_listboxRef$current = listboxRef.current) != null && _listboxRef$current.contains(document.activeElement)) {\n        // focus is within the listbox\n        return;\n      }\n      dispatch({\n        type: ActionTypes.blur,\n        event: event,\n        props: propsWithDefaults\n      });\n    };\n  };\n  var getRootProps = function getRootProps() {\n    var otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    return _extends({}, otherHandlers, {\n      'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? optionIdGenerator(highlightedValue, highlightedIndex) : undefined,\n      id: id,\n      onBlur: createHandleBlur(otherHandlers),\n      onKeyDown: createHandleKeyDown(otherHandlers),\n      role: 'listbox',\n      tabIndex: focusManagement === 'DOM' ? -1 : 0,\n      ref: handleRef\n    });\n  };\n  var getOptionState = function getOptionState(option) {\n    var selected;\n    var index = options.findIndex(function (opt) {\n      return optionComparer(opt, option);\n    });\n    if (multiple) {\n      var _ref;\n      selected = ((_ref = selectedValue) != null ? _ref : []).some(function (value) {\n        return value != null && optionComparer(option, value);\n      });\n    } else {\n      selected = optionComparer(option, selectedValue);\n    }\n    var disabled = isOptionDisabled(option, index);\n    return {\n      selected: selected,\n      disabled: disabled,\n      highlighted: highlightedIndex === index\n    };\n  };\n  var getOptionTabIndex = function getOptionTabIndex(optionState) {\n    if (focusManagement === 'activeDescendant') {\n      return undefined;\n    }\n    if (!optionState.highlighted) {\n      return -1;\n    }\n    if (optionState.disabled && !disabledItemsFocusable) {\n      return -1;\n    }\n    return 0;\n  };\n  var getOptionProps = function getOptionProps(option) {\n    var otherHandlers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var optionState = getOptionState(option);\n    var index = options.findIndex(function (opt) {\n      return optionComparer(opt, option);\n    });\n    return _extends({}, otherHandlers, {\n      'aria-disabled': optionState.disabled || undefined,\n      'aria-selected': optionState.selected,\n      id: optionIdGenerator(option, index),\n      onClick: createHandleOptionClick(option, otherHandlers),\n      onPointerOver: createHandleOptionPointerOver(option, otherHandlers),\n      role: 'option',\n      tabIndex: getOptionTabIndex(optionState)\n    });\n  };\n  React.useDebugValue({\n    highlightedOption: options[highlightedIndex],\n    selectedOption: selectedValue\n  });\n  return {\n    getRootProps: getRootProps,\n    getOptionProps: getOptionProps,\n    getOptionState: getOptionState,\n    highlightedOption: (_options$highlightedI = options[highlightedIndex]) != null ? _options$highlightedI : null,\n    selectedOption: selectedValue,\n    setSelectedValue: setSelectedValue,\n    setHighlightedValue: setHighlightedValue\n  };\n}","map":{"version":3,"names":["_extends","React","unstable_useForkRef","useForkRef","unstable_useId","useId","ActionTypes","defaultReducer","useControllableReducer","areArraysEqual","TEXT_NAVIGATION_RESET_TIMEOUT","defaultOptionComparer","optionA","optionB","defaultIsOptionDisabled","defaultOptionStringifier","option","String","useListbox","props","_props$optionIdGenera","_options$highlightedI","disabledItemsFocusable","disableListWrap","focusManagement","idProp","id","isOptionDisabled","externalListboxRef","listboxRef","multiple","optionComparer","optionStringifier","options","externalReducer","stateReducer","defaultIdGenerator","_","index","optionIdGenerator","propsWithDefaults","useRef","handleRef","textCriteriaRef","searchString","lastTime","highlightedValue","selectedValue","dispatch","highlightedIndex","useMemo","findIndex","previousOptions","useEffect","current","type","optionsChange","event","setSelectedValue","useCallback","setValue","value","setHighlightedValue","setHighlight","highlight","createHandleOptionClick","other","_other$onClick","onClick","call","defaultPrevented","preventDefault","optionClick","createHandleOptionPointerOver","_other$onMouseOver","onMouseOver","optionHover","createHandleKeyDown","_other$onKeyDown","onKeyDown","keysToPreventDefault","push","includes","key","keyDown","length","textCriteria","lowerKey","toLowerCase","currentTime","performance","now","textNavigation","createHandleBlur","_other$onBlur","_listboxRef$current","onBlur","contains","document","activeElement","blur","getRootProps","otherHandlers","undefined","role","tabIndex","ref","getOptionState","selected","opt","_ref","some","disabled","highlighted","getOptionTabIndex","optionState","getOptionProps","onPointerOver","useDebugValue","highlightedOption","selectedOption"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/ListboxUnstyled/useListbox.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils';\nimport { ActionTypes } from './useListbox.types';\nimport defaultReducer from './defaultListboxReducer';\nimport useControllableReducer from './useControllableReducer';\nimport areArraysEqual from '../utils/areArraysEqual';\nconst TEXT_NAVIGATION_RESET_TIMEOUT = 500; // milliseconds\n\nconst defaultOptionComparer = (optionA, optionB) => optionA === optionB;\nconst defaultIsOptionDisabled = () => false;\nconst defaultOptionStringifier = option => typeof option === 'string' ? option : String(option);\nexport default function useListbox(props) {\n  var _props$optionIdGenera, _options$highlightedI;\n  const {\n    disabledItemsFocusable = false,\n    disableListWrap = false,\n    focusManagement = 'activeDescendant',\n    id: idProp,\n    isOptionDisabled = defaultIsOptionDisabled,\n    listboxRef: externalListboxRef,\n    multiple = false,\n    optionComparer = defaultOptionComparer,\n    optionStringifier = defaultOptionStringifier,\n    options,\n    stateReducer: externalReducer\n  } = props;\n  const id = useId(idProp);\n  function defaultIdGenerator(_, index) {\n    return `${id}-option-${index}`;\n  }\n  const optionIdGenerator = (_props$optionIdGenera = props.optionIdGenerator) != null ? _props$optionIdGenera : defaultIdGenerator;\n  const propsWithDefaults = _extends({}, props, {\n    disabledItemsFocusable,\n    disableListWrap,\n    focusManagement,\n    isOptionDisabled,\n    multiple,\n    optionComparer,\n    optionStringifier\n  });\n  const listboxRef = React.useRef(null);\n  const handleRef = useForkRef(externalListboxRef, listboxRef);\n  const textCriteriaRef = React.useRef({\n    searchString: '',\n    lastTime: null\n  });\n  const [{\n    highlightedValue,\n    selectedValue\n  }, dispatch] = useControllableReducer(defaultReducer, externalReducer, propsWithDefaults);\n  const highlightedIndex = React.useMemo(() => {\n    return highlightedValue == null ? -1 : options.findIndex(option => optionComparer(option, highlightedValue));\n  }, [highlightedValue, options, optionComparer]);\n  const previousOptions = React.useRef([]);\n  React.useEffect(() => {\n    if (areArraysEqual(previousOptions.current, options, optionComparer)) {\n      return;\n    }\n    dispatch({\n      type: ActionTypes.optionsChange,\n      event: null,\n      options,\n      previousOptions: previousOptions.current,\n      props: propsWithDefaults\n    });\n    previousOptions.current = options;\n\n    // No need to re-run this effect if props change\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [options, optionComparer, dispatch]);\n  const setSelectedValue = React.useCallback(option => {\n    dispatch({\n      type: ActionTypes.setValue,\n      event: null,\n      value: option\n    });\n  }, [dispatch]);\n  const setHighlightedValue = React.useCallback(option => {\n    dispatch({\n      type: ActionTypes.setHighlight,\n      event: null,\n      highlight: option\n    });\n  }, [dispatch]);\n  const createHandleOptionClick = (option, other) => event => {\n    var _other$onClick;\n    (_other$onClick = other.onClick) == null ? void 0 : _other$onClick.call(other, event);\n    if (event.defaultPrevented) {\n      return;\n    }\n    event.preventDefault();\n    dispatch({\n      type: ActionTypes.optionClick,\n      option,\n      event,\n      props: propsWithDefaults\n    });\n  };\n  const createHandleOptionPointerOver = (option, other) => event => {\n    var _other$onMouseOver;\n    (_other$onMouseOver = other.onMouseOver) == null ? void 0 : _other$onMouseOver.call(other, event);\n    if (event.defaultPrevented) {\n      return;\n    }\n    dispatch({\n      type: ActionTypes.optionHover,\n      option,\n      event,\n      props: propsWithDefaults\n    });\n  };\n  const createHandleKeyDown = other => event => {\n    var _other$onKeyDown;\n    (_other$onKeyDown = other.onKeyDown) == null ? void 0 : _other$onKeyDown.call(other, event);\n    if (event.defaultPrevented) {\n      return;\n    }\n    const keysToPreventDefault = ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'];\n    if (focusManagement === 'activeDescendant') {\n      // When the child element is focused using the activeDescendant attribute,\n      // the listbox handles keyboard events on its behalf.\n      // We have to `preventDefault()` is this case to prevent the browser from\n      // scrolling the view when space is pressed or submitting forms when enter is pressed.\n      keysToPreventDefault.push(' ', 'Enter');\n    }\n    if (keysToPreventDefault.includes(event.key)) {\n      event.preventDefault();\n    }\n    dispatch({\n      type: ActionTypes.keyDown,\n      event,\n      props: propsWithDefaults\n    });\n\n    // Handle text navigation\n    if (event.key.length === 1 && event.key !== ' ') {\n      const textCriteria = textCriteriaRef.current;\n      const lowerKey = event.key.toLowerCase();\n      const currentTime = performance.now();\n      if (textCriteria.searchString.length > 0 && textCriteria.lastTime && currentTime - textCriteria.lastTime > TEXT_NAVIGATION_RESET_TIMEOUT) {\n        textCriteria.searchString = lowerKey;\n      } else if (textCriteria.searchString.length !== 1 || lowerKey !== textCriteria.searchString) {\n        // If there is just one character in the buffer and the key is the same, do not append\n        textCriteria.searchString += lowerKey;\n      }\n      textCriteria.lastTime = currentTime;\n      dispatch({\n        type: ActionTypes.textNavigation,\n        event,\n        searchString: textCriteria.searchString,\n        props: propsWithDefaults\n      });\n    }\n  };\n  const createHandleBlur = other => event => {\n    var _other$onBlur, _listboxRef$current;\n    (_other$onBlur = other.onBlur) == null ? void 0 : _other$onBlur.call(other, event);\n    if (event.defaultPrevented) {\n      return;\n    }\n    if ((_listboxRef$current = listboxRef.current) != null && _listboxRef$current.contains(document.activeElement)) {\n      // focus is within the listbox\n      return;\n    }\n    dispatch({\n      type: ActionTypes.blur,\n      event,\n      props: propsWithDefaults\n    });\n  };\n  const getRootProps = (otherHandlers = {}) => {\n    return _extends({}, otherHandlers, {\n      'aria-activedescendant': focusManagement === 'activeDescendant' && highlightedValue != null ? optionIdGenerator(highlightedValue, highlightedIndex) : undefined,\n      id,\n      onBlur: createHandleBlur(otherHandlers),\n      onKeyDown: createHandleKeyDown(otherHandlers),\n      role: 'listbox',\n      tabIndex: focusManagement === 'DOM' ? -1 : 0,\n      ref: handleRef\n    });\n  };\n  const getOptionState = option => {\n    let selected;\n    const index = options.findIndex(opt => optionComparer(opt, option));\n    if (multiple) {\n      var _ref;\n      selected = ((_ref = selectedValue) != null ? _ref : []).some(value => value != null && optionComparer(option, value));\n    } else {\n      selected = optionComparer(option, selectedValue);\n    }\n    const disabled = isOptionDisabled(option, index);\n    return {\n      selected,\n      disabled,\n      highlighted: highlightedIndex === index\n    };\n  };\n  const getOptionTabIndex = optionState => {\n    if (focusManagement === 'activeDescendant') {\n      return undefined;\n    }\n    if (!optionState.highlighted) {\n      return -1;\n    }\n    if (optionState.disabled && !disabledItemsFocusable) {\n      return -1;\n    }\n    return 0;\n  };\n  const getOptionProps = (option, otherHandlers = {}) => {\n    const optionState = getOptionState(option);\n    const index = options.findIndex(opt => optionComparer(opt, option));\n    return _extends({}, otherHandlers, {\n      'aria-disabled': optionState.disabled || undefined,\n      'aria-selected': optionState.selected,\n      id: optionIdGenerator(option, index),\n      onClick: createHandleOptionClick(option, otherHandlers),\n      onPointerOver: createHandleOptionPointerOver(option, otherHandlers),\n      role: 'option',\n      tabIndex: getOptionTabIndex(optionState)\n    });\n  };\n  React.useDebugValue({\n    highlightedOption: options[highlightedIndex],\n    selectedOption: selectedValue\n  });\n  return {\n    getRootProps,\n    getOptionProps,\n    getOptionState,\n    highlightedOption: (_options$highlightedI = options[highlightedIndex]) != null ? _options$highlightedI : null,\n    selectedOption: selectedValue,\n    setSelectedValue,\n    setHighlightedValue\n  };\n}"],"mappings":";AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,IAAIC,UAAU,EAAEC,cAAc,IAAIC,KAAK,QAAQ,YAAY;AACvF,SAASC,WAAW,QAAQ,oBAAoB;AAChD,OAAOC,cAAc,MAAM,yBAAyB;AACpD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,cAAc,MAAM,yBAAyB;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